package com.openbravo.data.loader;

import com.openbravo.basic.BasicException;
import com.openbravo.format.Formats;

public class VectorerBasic
  implements Vectorer
{
  private int[] m_aiIndex;
  private String[] m_asHeaders;
  private Formats[] m_aFormats;

  public VectorerBasic(String[] paramArrayOfString, Formats[] paramArrayOfFormats, int[] paramArrayOfInt)
  {
    this.m_asHeaders = paramArrayOfString;
    this.m_aFormats = paramArrayOfFormats;
    this.m_aiIndex = paramArrayOfInt;
  }

  public String[] getHeaders()
    throws BasicException
  {
    String[] arrayOfString = new String[this.m_aiIndex.length];
    for (int i = 0; i < this.m_aiIndex.length; i++)
      arrayOfString[i] = this.m_asHeaders[this.m_aiIndex[i]];
    return arrayOfString;
  }

  public String[] getValues(Object paramObject)
    throws BasicException
  {
    Object[] arrayOfObject = (Object[])(Object[])paramObject;
    String[] arrayOfString = new String[this.m_aiIndex.length];
    for (int i = 0; i < this.m_aiIndex.length; i++)
      arrayOfString[i] = this.m_aFormats[this.m_aiIndex[i]].formatValue(arrayOfObject[this.m_aiIndex[i]]);
    return arrayOfString;
  }
}

/* Location:           D:\PowerFulPOS-2.30.2\openbravopos.jar
 * Qualified Name:     com.openbravo.data.loader.VectorerBasic
 * JD-Core Version:    0.6.0
 */